var o, e = require, t = module, n = exports, i = this && this.__extends || (o = function(e, t) {
    return (o = Object.setPrototypeOf || {
        __proto__: []
    } instanceof Array && function(e, t) {
        e.__proto__ = t;
    } || function(e, t) {
        for (var o in t) t.hasOwnProperty(o) && (e[o] = t[o]);
    })(e, t);
}, function(e, t) {
    function i() {
        this.constructor = e;
    }
    o(e, t), e.prototype = null === t ? Object.create(t) : (i.prototype = t.prototype, 
    new i());
}), a = this && this.__decorate || function(e, t, o, i) {
    var n, c = arguments.length, l = c < 3 ? t : null === i ? i = Object.getOwnPropertyDescriptor(t, o) : i;
    if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) l = Reflect.decorate(e, t, o, i); else for (var a = e.length - 1; 0 <= a; a--) (n = e[a]) && (l = (c < 3 ? n(l) : 3 < c ? n(t, o, l) : n(t, o)) || l);
    return 3 < c && l && Object.defineProperty(t, o, l), l;
};

Object.defineProperty(n, "__esModule", {
    value: !0
});

var r = e("PrefabView"), s = cc._decorator, c = s.ccclass, l = s.property, d = function(t) {
    function e() {
        var e = null !== t && t.apply(this, arguments) || this;
        return e.layout = null, e.money = null, e.moneyLabel = null, e.diamond = null, e.diamondLabel = null, 
        e.piece = null, e.pieceLabel = null, e.msgLabel = null, e;
    }
    return i(e, t), e.prototype.onLoad = function() {
        this.node.zIndex = 1e4;
    }, e.prototype.start = function() {}, e.prototype.init = function(e) {
        e.money ? (this.money.active = !0, this.moneyLabel.string = "+ " + GA.formatNumber(e.money)) : this.money.active = !1, 
        e.diamond ? (this.diamond.active = !0, this.diamondLabel.string = "+ " + GA.formatNumber(e.diamond)) : this.diamond.active = !1, 
        e.piece ? (this.piece.active = !0, this.pieceLabel.string = "+ " + GA.formatNumber(e.piece)) : this.piece.active = !1, 
        e.str ? (this.msgLabel.node.active = !0, this.msgLabel.string = e.str) : this.msgLabel.node.active = !1, 
        this.showPnl(e.delay);
    }, e.prototype.showPnl = function(e) {
        this.unschedule(this.hidePnl), isNaN(e) ? this.scheduleOnce(this.hidePnl, 1) : this.scheduleOnce(this.hidePnl, e), 
        cc.Tween.stopAllByTarget(this.node), this.node.opacity = 255, t.prototype.showPnl.call(this);
    }, e.prototype.hidePnl = function() {
        var e = this;
        this.unschedule(this.hidePnl), cc.tween(this.node).to(1, {
            opacity: 0
        }).call(function() {
            e.msgLabel.node.active = !1, t.prototype.hidePnl.call(e);
        }).start();
    }, a([ l(cc.Node) ], e.prototype, "layout", void 0), a([ l(cc.Node) ], e.prototype, "money", void 0), 
    a([ l(cc.Label) ], e.prototype, "moneyLabel", void 0), a([ l(cc.Node) ], e.prototype, "diamond", void 0), 
    a([ l(cc.Label) ], e.prototype, "diamondLabel", void 0), a([ l(cc.Node) ], e.prototype, "piece", void 0), 
    a([ l(cc.Label) ], e.prototype, "pieceLabel", void 0), a([ l(cc.Label) ], e.prototype, "msgLabel", void 0), 
    a([ c ], e);
}(r.default);

n.default = d;